<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    姓名：<input type="text" ref="userInput" v-on:keyup="recordInputLog">

</div>
</body>
</html>
<script src="../../js/vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {},
        methods: {
            recordInputLog() {
                console.log(this.$refs.userInput.value);
            },
        },
    });
</script>

